package xyz.riceball.develop.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import xyz.riceball.develop.mapper.InoutParamMapper;
import xyz.riceball.develop.entity.po.InoutParamPO;
import xyz.riceball.develop.service.InoutParamService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import xyz.riceball.framework.core.bean.ApiR;
import xyz.riceball.framework.core.bean.ApiRc;

import java.util.List;

/**
 * 输入输出参数 Service实现层
 *
 * @author xiaovcloud
 * @since 2022-07-02 10:58:37
 */
@Service("inoutparamService")
public class InoutParamServiceImpl extends ServiceImpl<InoutParamMapper, InoutParamPO> implements InoutParamService {
    @Override
    public List<InoutParamPO> selectAll(InoutParamPO inoutParamPO) {
        LambdaQueryWrapper<InoutParamPO> wrapper = Wrappers.<InoutParamPO>lambdaQuery();

        return getBaseMapper().selectList(wrapper);
    }

    @Override
    public ApiR<InoutParamPO> add(InoutParamPO inoutParamPO) {
        checkInoutBeforeAdd(inoutParamPO);
        return null;
    }

    /**
     * 新增前的检测
     *
     * @param inoutParamPO
     */
    private void checkInoutBeforeAdd(InoutParamPO inoutParamPO) {


    }

    @Override
    public boolean edit(InoutParamPO inoutParamPO) {
        checkInoutBeforeEdit(inoutParamPO);


        return false;
    }

    /**
     * 修改前的检测
     *
     * @param inoutParamPO
     */
    private void checkInoutBeforeEdit(InoutParamPO inoutParamPO) {

    }

    @Override
    public ApiRc<Void> delete(List<String> ids) {
        return null;
    }
}
